<template>
    <div class="mask">
        <div class="TMB-warp">
            <div class="titler">
                <span class="font-w fs16" style="font-weight: 700;"> 関連スプール図 </span>
                <i class="el-icon-close" @click="$emit('CloseTerm')"></i>
            </div>
            <div class="middle">
                <ux-grid class="ux-table" ref="singleTable" :data="prposTabelData" :header-cell-style="{
                    color: 'rgba(0, 0, 0, 0.85)',
                    fontSize: '14px',
                    textAlign: 'left',
                    fontWeight: 'bold',
                    padding: 0,
                    height: '32px',
                    background: 'rgb(244,245,246)'
                }" :cell-style="{
                    color: 'rgba(96,98,102,1)',
                    fontSize: '14px',
                    textAlign: 'left',
                    padding: 0,
                    height: '32px',
                }" :checkbox-config="{
                    showHeader: false,
                }" highlight-current-row v-loading="loading" element-loading-spinner="el-icon-loading"
                    element-loading-background="#f8f8f8" :element-loading-text="$t('message.bhView.loading')"
                    height="500">
                    <template slot="empty"> No data </template>

                    <ux-table-column property="label" title="スプールNo." align="center">
                        <template slot-scope="scope">
                            {{ scope.row.name }}
                        </template>
                    </ux-table-column>
                </ux-grid>

                <div class="footer">
                    <!-- <button @click="$emit('CloseTerm')">Cancel</button> -->
                    <el-button type="primary" @click="$emit('CloseTerm')">OK</el-button>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import BASE from '@/utils/base'
import { GetAssSpollMapList } from '@/api/api'
import eventBus from "@/eventBus/bus";

export default {
    name: "Dialog4",
    props: ["MacCode"],
    data() {
        return {
            prposTabelData: [
                // {
                //     test: 111
                // }
            ],
            loading: false,


        };
    },
    components: {},
    watch: {},
    methods: {
        async initFn() {
            let dataJson = {
                MacCode: Number(this.MacCode)
            };
            let res = await GetAssSpollMapList(dataJson);
            res.data.data.forEach(item => {
                this.prposTabelData.push({
                    name: item
                })
            })
        }
    },
    created() { },
    mounted() {
        this.initFn();
    },
    beforeDestroy() { },
    destroyed() { },
    updated() {

    },
};
</script>

<style lang="scss" scoped>
.mask {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
}

.TMB-warp {
    width: 400px;
    background: rgb(255, 255, 255);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    box-shadow: 0px 12px 48px 16px rgba(0, 0, 0, 0.05),
        0px 9px 28px 0px rgba(0, 0, 0, 0.08), 0px 6px 16px -8px rgba(0, 0, 0, 0.15);
    z-index: 100;

    .titler {
        height: 43px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 13px 24px;
        border-bottom: 1px solid #F0F0F0FF;

        i {
            cursor: pointer;
        }
    }

    .middle {
        padding: 13px 24px;

        .router {
            padding-bottom: 13px;
        }

        .title {
            display: flex;
            margin-bottom: 13px;

            .seach {
                width: 24px;
                height: 24px;
                border-radius: 4px;
                border: 1px solid #d9d9d9;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                margin-right: 12px;
            }

            .form-ipt {
                height: 24px;

                ::v-deep .el-input__inner {
                    width: 197px;
                    height: 24px;
                    background: #fff;
                }
            }
        }

        ::v-deep .ux-table * {
            border: none;
        }

        ::v-deep .elx-table {
            border: 1px solid #00000026;
        }

        .table {
            border-bottom: 1px solid red !important;
        }

        .footer {
            border-top: 1px solid #f0f0f0;
            padding-top: 14px;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: flex-end;

            button {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 92px !important;
                height: 32px;
                // margin-left: 16px;
                // background: #ffffff;
                // border: 1px solid #d9d9d9;
                border-radius: 2px;
            }

            button:nth-child(1) {
                // background: #106ebe;
                // color: #fff;
                // border: 0 none;
            }
        }
    }
}

.iconfont {
    font-size: 24px;
    margin: 0 8px;
}

.tableIcon {
    font-size: 20px;
    margin: 0 4px;
}

.el-breadcrumb__item {
    cursor: pointer;
}
</style>
